Skip to content

Add a Discord host for the weather + WorkIQ agent - #660

Closed
vinchencc wants to merge 3 commits into
mainfrom
users/t-vinchen/discord-adapter
Closed

Add a Discord host for the weather + WorkIQ agent#660
vinchencc wants to merge 3 commits into
mainfrom
users/t-vinchen/discord-adapter

Conversation

@vinchencc

Copy link
Copy Markdown

What

A standalone Discord host that runs the weather + WorkIQ agent in Discord. Discord has no Azure Bot Service channel and no Agents SDK extension, so this connects directly to the Discord Gateway with Discord.Net and drives an Agent Framework agent — no custom IChannelAdapter needed.

How

  • Discord.Net.WebSocket for the Gateway; on each message run an Agent Framework ChatClientAgent.
  • Weather tools (lightweight, no ITurnContext) + WorkIQ MCP tools loaded via a raw ModelContextProtocol.Core client (bearer token → mcp_TeamsServer), since the A365 tooling service requires a Bot Framework turn context that Discord doesn't have.
  • Replies render as Discord embeds (Discord's card equivalent): blue accent, "🐾 Purrfect Assistant" author, footer.
  • Per-channel conversation sessions. Config (bot token, Azure OpenAI, OpenWeather, WorkIQ token) via user-secrets / env.

Validation (live in Discord)

  • "What's the weather in Seattle, WA?" → weather embed card.
  • "What Teams am I a member of?" → ListTeams returned real tenant data ("Agents SDK 4"). Startup loaded 36 WorkIQ MCP tools.

Notes

  • WorkIQ uses a dev bearer token (no OBO sign-in channel on Discord).

vinchencc added 3 commits July 9, 2026 21:39
Slack channel messages are rendered as a Block Kit card (blue accent, header, section, divider, context footer) via SlackExtension.CallAsync/chat.postMessage. Other channels keep the streaming text experience. Also gitignore a365 config + Slack per-conversation state.
Discord has no Azure Bot Service channel, so this hosts the agent directly with Discord.Net (Gateway). Incoming messages drive an Agent Framework ChatClientAgent (weather tools + WorkIQ MCP tools via dev bearer token to mcp_TeamsServer); replies render as Discord embeds. Per-channel conversation sessions. Bot token + WorkIQ token via user-secrets/env.
@github-actions github-actions Bot added the Samples Changes to Samples label Jul 22, 2026
@vinchencc

Copy link
Copy Markdown
Author

Live in Discord — weather + WorkIQ both rendered as embed cards. "What Teams am I a member of?" returned real tenant data ("Agents SDK 4") through the WorkIQ MCP server (36 tools loaded).
image

@vinchencc

Copy link
Copy Markdown
Author

Superseded by #670

@vinchencc vinchencc closed this Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Samples Changes to Samples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant